FROM texlive/texlive:latest

WORKDIR /app

RUN apt-get update && apt-get install -y python3-pip python3-venv pandoc && ln -sf /usr/bin/python3 /usr/bin/python

# modify timezone
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

COPY . /app

RUN python3 -m venv venv
ENV PATH="/app/venv/bin:$PATH"
ENV VIRTUAL_ENV="/app/venv"

RUN pip install --upgrade pip
RUN pip install -r requirements.txt

# Expose ports
EXPOSE 8080

# Set the startup command
CMD ["python", "main.py"]